 <%@page import="java.sql.ResultSet"%>
 
<%@page import="java.sql.PreparedStatement"%>
 
<%@page import="java.sql.Connection"%>
 
<%@page import="com.mysql.jdbc.Driver"%>
 
<%@page import="java.sql.DriverManager"%>
 
<%@ page language="java" contentType="text/html; charset=UTF-8"
 
    pageEncoding="UTF-8"%>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
<html>
 
<head>
 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
<title>留言清單</title>
 
</head>
 
<body>
 
<%
 
DriverManager.registerDriver(new Driver());
 
Connection conn = DriverManager.getConnection("jdbc:mysql://j.snpy.org/j102u07?useUnicode=true&characterEncoding=UTF-8",
 
		"j102u07", "j102u07.989");
 
String sql = "select id,nickname,password,password1,email,talk from users";
 
PreparedStatement pstmt = conn.prepareStatement(sql);
 
ResultSet rs = pstmt.executeQuery();
 
%>
 
<table border="1">
 
<%
 

 
while (rs.next()) {
 
	%>
 
	<TR>
 
	<%
 
	String id = rs.getString("id");
	
	String nickname = rs.getString("nickname");
 
	String password = rs.getString("password");
	
	String password1 = rs.getString("password1");
 
	String email = rs.getString("email");
 
	String talk = rs.getString("talk");
	

	%>
 
		<TD><%=id %></TD>
 
		<TD><%=nickname %></TD>
		
		<TD><%=password %></TD>
 
		<TD><%=password1 %></TD>
 
		<TD><%=email %></TD>
		
		<TD><%=talk %></TD>
 
		 
 
	</TR>
 
	<%
 
}
 

 
%>
 
</table>
 

 
</body>
 
</html> 